﻿using System.Configuration;
using Framework;

namespace Enterprise
{
    public class ArticleConfig : ConfigService
    {
        static ArticleConfig()
        {
            ThumbnailWidth = ConfigurationManager.AppSettings["ArticleThumbnailWidth"].SafeToInt();
            ThumbnailHeight = ConfigurationManager.AppSettings["ArticleThumbnailHeight"].SafeToInt();
            ThumbnailPrefix = ConfigurationManager.AppSettings["ArticleThumbnailPrefix"].SafeToString();
            ImageSize = ConfigurationManager.AppSettings["ArticleImageSize"].SafeToInt();
            NormalWidth = ConfigurationManager.AppSettings["ArticleNormalWidth"].SafeToInt();
            NormalHeight = ConfigurationManager.AppSettings["ArticleNormalHeight"].SafeToInt();
            NormalPrefix = ConfigurationManager.AppSettings["ArticleNormalPrefix"].SafeToString();
            IsWaterMark = ConfigurationManager.AppSettings["IsArticleWaterMark"].SafeToBool();
            WaterMarkFileName = ConfigurationManager.AppSettings["ArticleWaterMarkFileName"].SafeToString();
            WaterMarkRelativePath = ConfigurationManager.AppSettings["ArticleWaterMarkRelativePath"].SafeToString();
            IsGenerateThumbnail = ConfigurationManager.AppSettings["IsArticleGenerateThumbnail"].SafeToBool();
            IsGenerateNormal = ConfigurationManager.AppSettings["IsArticleGenerateNormal"].SafeToBool();
            IsAdaptive = ConfigurationManager.AppSettings["IsArticleImageAdaptive"].SafeToBool();
            RelativePath = ConfigurationManager.AppSettings["ArticleImageRelativePath"].SafeToString();
        }
        public new static int ThumbnailWidth { get; set; }

        public new static int ThumbnailHeight { get; set; }

        public new static int ImageSize { get; set; }

        public new static bool IsGenerateThumbnail { get; set; }

        public new static string ThumbnailPrefix { get; set; }

        public new static bool IsWaterMark { get; set; }

        public new static string RelativePath { get; set; }

        public new static string WaterMarkFileName { get; set; }

        public new static string WaterMarkRelativePath { get; set; }

        public new static bool IsGenerateNormal { get; set; }

        public new static bool IsAdaptive { get; set; }

        public new static int NormalWidth { get; set; }

        public new static int NormalHeight { get; set; }

        public new static string NormalPrefix { get; set; }
    }
}
